#include <muduo/base/Logging.h>
#include <muduo/net/EventLoop.h>
#include <iostream>
#include "lua.hpp"

#include "server/WaterMarkServer.h"
#include "base/luaSet.h"

using namespace muduo;
using namespace muduo::net;


//一个测试例子
int main()
{
    int port = getPort();
    if (port == -1) {
        std::cout << "cant load port, use default 2007" << std::endl;
        port = 2007;
    } else {
        std::cout << "listen at " << port << std::endl;
    }
    LOG_INFO << "pid = " << getpid();
    muduo::net::EventLoop loop;
    muduo::net::InetAddress listenAddr(port);
    ISServer server(&loop, listenAddr);
    server.start();
    loop.loop();
    return 0;
}